#include <iostream>
#include <stdio.h>

using namespace std;

int main() {
    int n,k;
    cin >> n >> k;
    int idx = 0;
    int g = 0;
    int mxi = 0; 
    for(int i = 0; i < n; i++){
        idx++;
        cin >> g;
        if(g == k){
            mxi = idx;
        }
    }
    cout << mxi;
    return 0;
}